<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07_DOM操作2</title>
</head>
<body>
    <input type="text" id="i1">
    <input type="text" id="i2">
    <button onclick="f()">按钮1</button>
    <hr>
    <h4>我是标题：<span id="ss"></span></h4>
    <button onclick="f2()">按钮2</button>
    <script>
        function f2(){
            let spanE1 = document.querySelector('span');
            // let spanE2 = document.querySelector('#ss');
            // let spanE3 = document.querySelector('ss');
            // console.log(spanE1,spanE2,spanE3);
            spanE1.innerHTML = '你好~~';
        }
        function f(){
            console.log(i1.value,typeof i1.value);
            let a = parseFloat(i1.value)
            console.log(a,typeof a);
        }
    </script>




</body>
</html>